﻿@model Lavka.Models.Pages

@{
    ViewBag.Title = "Create";
}

<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>

@using (Html.BeginForm()) {
    @Html.ValidationSummary(true)
    <div class="panel ui-corner-all">
        <h2>Создание страницы</h2>

        @Html.HiddenFor(model => model.ParentId)

        <div class="editor-label">
            @Html.LabelFor(model => model.Title)
        </div>
        <div class="editor-field wide">
            @Html.EditorFor(model => model.Title)
            @Html.ValidationMessageFor(model => model.Title)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Description)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Description)
            @Html.ValidationMessageFor(model => model.Description)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Keywords)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Keywords)
            @Html.ValidationMessageFor(model => model.Keywords)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Path)
        </div>
        <div class="editor-field wide">
            @Html.EditorFor(model => model.Path)
            @Html.ValidationMessageFor(model => model.Path)
        </div>

        <div class="navigateButton">
            <input type="submit" value="Добавить" class="button" />
        </div>
        <div>
            @Html.ActionLink("Назад к списку", "Index")
        </div>
    </div>
}
